/**
 * GameTableWindowSingleton.java
 * 
 * @author Beatrice Bacelli
 * @author Luca Bedogni
 * @author Silvia Righini
 */
package unibo.lsb.graphic;

/**
 * Singleton for {@link GameTableWindow}
 */
public class GameTableWindowSingleton {

	private static GameTableWindowSingleton gts;
	private static GameTableWindow gameTable;

	private GameTableWindowSingleton() {
		gameTable = new GameTableWindow();
	}

	public static GameTableWindow getGameTablePanel() {
		return gameTable;
	}

	public static GameTableWindowSingleton getInstance() {
		if (gts == null) {
			gts = new GameTableWindowSingleton();
		}
		return gts;
	}

	public static void closeGame() {
		gameTable = null;
		InformationPanelSingleton.closeGame();
	}
}
